<!DOCTYPE HTML>
<html>
<head>
    <!-- 电子券主题查看详情页面 -->
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--<meta http-equiv="Content-Type" content="multipart/form-data; charset=utf-8" />-->
    <!--[if lt IE 9]>
    <script type="text/javascript" src="../../lib/html5shiv.js?rev=@@hash"></script>
    <script type="text/javascript" src="../../lib/respond.min.js?rev=@@hash"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="../../static/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="../../lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../ht-css/Project.css"/>
    <!--[if IE 6]>
    <script type="text/javascript" src="../../lib/DD_belatedPNG_0.0.8a-min.js?rev=@@hash"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="../../ht-css/style-q.css"/>
    <title>查看电子券主题</title>
</head>
<body>
<nav class="breadcrumb">电子券管理 <span class="c-gray en">&gt;</span> 电子券主题详情<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a></nav>
<article class="page-container">
    <form class="ml-20 mr-20" id="coupon-add">
        <div>
            <div class="bg-1 bk-gray pd-20 mb-20">
                <div class="va-m lh-20 f-16 pb-15">
                    <strong>状态：</strong><strong id="topicStatus"></strong>
                    <div class="clearfix mb-15 mt-20" id="descReason">
                        <label class="f-l pt-5 ml-20">原因：</label>
                        <div class="formControls col-sm-5"><textarea name="description" id="reason" class="textarea" title="" readonly></textarea></div>
                    </div>
                </div>
                <div class="line"></div>

                <div class="va-m lh-20 f-16 pb-15 mt-50">
                    <strong>基本信息</strong>
                </div>
                <div class="line"></div>
                <table class="table-hover mb-10 mt-10 table">
                    <thead class="text-l">
                    <tr>
                        <td class="col-4-1">
                            <div class="row ml-10">
                                <label class="form-label f-l pt-5">电子券主题编码：</label>
                                <span class="f-l pt-5" name="topicCode" id="topicCode">----</span>
                            </div>
                        </td>
                        <td class="col-4-1">
                            <label class="form-label f-l pt-5">&nbsp;类型：</label>
                            <span class="f-l pt-5" id="topicType">
                </span>
                        </td>
                        <td class="col-4-1">
                            <label class="form-label f-l pt-5">&nbsp;制券人：</label>
                            <span class="f-l pt-5" name="createUsername" id="createUsername">张三</span>
                        </td>
                        <td class="col-4-1">
                            <label class="form-label f-l pt-5">制券部门：</label>
                            <span class="f-l pt-5" name="createDept" id="createDept">运营部门</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="col-4-1">
                            <div class="row ml-10">
                                <label class="form-label f-l pt-5">名称：</label>
                                <div class="formControls f-l">
                                    <span id="topicName" class="f-l pt-5"></span>
                                </div>
                            </div>
                        </td>
                        <td class="col-4-1">
                            <div class="row ml-5">
                                <label class="form-label f-l pt-5">面额：</label>
                                <div class="formControls f-l">
                                    <span id="amount" class="f-l pt-5"></span>
                                </div>
                                <span class="f-l pd-5">元</span>
                            </div>
                        </td>
                        <td class="col-4-1">
                            <div class="row ml-10">
                                <label class="form-label f-l pt-5">数量：</label>
                                <div class="formControls f-l"><span  id="totalCount" class="f-l pt-5"></span>
                                </div>
                            </div>
                        </td>
                        <td class="col-4-1">
                            <span class="f-l pt-5 c-red">共计生成优惠金额<span id="countPrice" class="ml-10 mr-10 c-red"></span>元</span>
                        </td>
                    </tr>
                    </thead>
                </table>
                <div class="pd-20">
                    <div class="clearfix mb-15">
                        <label class="f-l pt-5">描述：</label>
                        <div class="formControls col-sm-5">
                            <textarea name="description" id="description" class="textarea" title=""readonly></textarea>
                        </div>
                    </div>
                    <div class="clearfix mb-15 skin-minimal">
                        <label class="f-l pt-5">使用门槛：</label>
                        <span class="f-l pt-5" id="condition">单笔订单中适用商品金额满<b class="ml-20 mr-20" id="useCondition"></b>元使用</span>
                    </div>
                    <div class="clearfix mb-15">
                        <label class="f-l pt-5">使用说明：</label>
                        <div class="formControls col-sm-5"><span id="introduction"  class="f-l pt-5"></span></div>
                    </div>
                </div>
                <div  class="clearfix mb-15">
                    <label class="form-label f-l text-r w-60 lh-26 pl-15" style="width: 84px">适用支付方式：</label>
                    <div class="formControls f-l ml-10 lh-26" id="applPaidType" >
                        <label><input type="checkbox" value="1001,1301,1701" name="applPaidType" id="checkbox_id" disabled/>全部&nbsp;&nbsp;&nbsp;</label>
                        <label><input type="checkbox" value="1001" name="paidType" id="paidType1" disabled/>在线支付&nbsp;&nbsp;&nbsp;</label>
                        <label><input type="checkbox" value="1301" name="paidType" id="paidType2" disabled/>线下汇款&nbsp;&nbsp;&nbsp;</label>
                        <!--<label><input type="checkbox" value="1401" name="paidType" id="paidType3" disabled/>银行汇票&nbsp;&nbsp;&nbsp;</label>
                        <label><input type="checkbox" value="1101" name="paidType" id="paidType4" disabled/>货到付款&nbsp;&nbsp;&nbsp;</label>
                        <label><input type="checkbox" value="1201" name="paidType" id="paidType5" disabled/>账期支付&nbsp;&nbsp;&nbsp;</label>-->
                        <label><input type="checkbox" value="1701" name="paidType" id="paidType6" disabled/>货到付款&nbsp;&nbsp;&nbsp;</label>
                    </div>
                </div>
                <div class="clearfix mb-15" >
                    <div class="row ml-5">
                        <label class="f-l pt-5">适用价格类型：</label>
                        <div class="formControls f-l ml-10 lh-26" >
                            <label><input type="radio" value="0" name="applPaidType" id="radio_id" disabled/>不限&nbsp;&nbsp;&nbsp;</label>
                            <label><input type="radio" value="20" name="paidType" id="priceType1" disabled/>现金价&nbsp;&nbsp;&nbsp;</label>
                            <label><input type="radio" value="10" name="paidType" id="priceType2" disabled/>售价&nbsp;&nbsp;&nbsp;</label>
                        </div>
                    </div>
                </div>
                <div class="clearfix mb-15" id="automatic">
                    <div class="row ml-5">
                        <label class="f-l pt-5">是否抽奖自动发券使用：</label>
                        <div class="formControls f-l">
                            <span id="topicUseTag" class="f-l pt-5"></span>
                        </div>
                    </div>
                </div>
                <div class="clearfix mb-15 skin-minimal">
                    <label class="form-label f-l pt-5">适用品类说明：</label>
                    <div class="formControls f-l">
                        <input type="text" class="input-text radius" name="applCategoryIntroduce"
                               id="applCategoryIntroduce"
                               placeholder="" maxlength="25" width="90%" onblur="if(this.value==0){this.value=''}" readonly>
                        <span id="message11" class="tip"></span>
                    </div>
                </div>
                <div class="clearfix mb-15 skin-minimal">
                    <label class="form-label f-l pt-5">指向专题URL：</label>
                    <div class="formControls f-l">
                        <input type="text" class="input-text radius" name="topicUrl" id="topicUrl"
                               placeholder="" maxlength="1000" width="90%" readonly><!--<span id="message12" class="tip"></span>-->
                    </div>
                    <div>&nbsp;&nbsp;<a onclick="bianji()">编辑</a> <div  class="btn btn-secondary radius size-S ml-10" id="addtop" style="width: 70px;display:none" onclick="addtopurl()">保&nbsp;&nbsp;存</div></div>
                </div>
                <div class="va-m lh-20 f-16 pb-15">
                    <strong>用券规则</strong>
                </div>
                <div class="line"></div>
                <div class="pd-20">
                    <div>
                        <div class="clearfix mb-15 skin-minimal">
                            <label class="f-l pt-5">有效时间：</label>
                            <span  class="f-l pt-5" id="useTime">领到券当日开始<span id="dayNumber"></span>天内有效</span>
                        </div>

                    </div>

                    <div class="clearfix mb-15 skin-minimal">
                        <label class="f-l pt-5">适用端口：</label>
                        <span class="f-l pt-5" id="applPort"></span>
                    </div>

                    <div class="clearfix mb-15 skin-minimal">
                        <label class="f-l pt-5" id="applProduct">适用商品：</label>
                        <span class="f-l pt-5" id="applRange"></span>

                    </div>

                    <div class="clearfix mb-15l" style="padding-left:70px;" >
                        <div class="clearfix mb-15 skin-minimal">
                            <span id="applCate"></span>
                        </div>
                        <div class="line" id="line"></div>
                        <div class="clearfix pt-20 pb-20" id="category">
                            <div class="class-wp27 f-l">
                                <div class="pd-5"><strong>一级分类名称</strong></div>
                                <ul class="bk-gray pt-5" id="classSet1"></ul>
                            </div>
                            <div class="class-wp27 f-l" style="display: none" id="classDiv2">
                                <div class="pd-5"><strong>二级分类名称</strong></div>
                                <ul class="bk-gray pt-5" id="classSet2"></ul>
                            </div>
                            <div class="class-wp27 f-l" style="display: none" id="classDiv3">
                                <div class="pb-5"><strong>三级分类名称</strong></div>
                                <ul class="bk-gray pt-5" id="classSet3"></ul>
                            </div>
                            <div class="class-wp27 f-l" style="display: none" id="classDiv4">
                                <div class="pb-5"><strong>三级分类名称</strong></div>
                                <ul class="bk-gray pt-5" id="classSet4"></ul>
                            </div>
                        </div>
                        <div class="clearfix pb-20 HuiTab" id="tab_goods">
                            <div class="tabBar clearfix">
                                <span class="current" name="applProduct" value="1">适用商品</span>
                                <span name="applProduct" value="2">排除商品</span>
                                <div class="f-l pd-10 ml-50"><a id="putout">导出商品</a></div>
                            </div>
                        
                            <div class="tabCon" id="tabbox1" style="display:block">
							<div class="c-999 pd-10">适用以下商品：共<span id="applNumber">0</span>个</div>
                                <table>
                                    <tr>
                                        <td class="col-2-1 pl-20">SPU</td>
                                        <td class="col-2-1 pl-20">Code</td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="formControls col-sm-11"><textarea name="abstract" class="textarea" id="spuText" title="" style="height:300px"></textarea>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="formControls col-sm-11"><textarea name="abstract" class="textarea" id="skuText" title="" style="height:300px"></textarea>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="tabCon" id="tabbox2">
							<div class="c-999 pd-10">排除以下商品：共<span id="removeNumber">0</span>个</div>
                                <table>
                                    <tr>
                                        <td class="col-2-1 pl-20">SPU</td>
                                        <td class="col-2-1 pl-20">Code</td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="formControls col-sm-11"><textarea name="abstract" class="textarea" id="spuText1" title="" style="height:300px"></textarea>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="formControls col-sm-11"><textarea name="abstract" class="textarea" id="skuText1" title="" style="height:300px"></textarea>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <!--<div class="text-c mb-10 ">-->
                    <!--<input id="bottm" type="submit" class="btn btn-secondary radius size-S botter"-->
                           <!--value="&nbsp;确&nbsp;&nbsp;认&nbsp;">-->
                <!--</div>-->
            </div>
        </div>
    </form>
</article>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../../lib/jquery/1.9.1/jquery.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/layer/2.4/layer.js?rev=@@hash"></script>
<script type="text/javascript" src="../../static/h-ui/js/H-ui.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../static/h-ui.admin/js/H-ui.admin.js?rev=@@hash"></script> <!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../../lib/My97DatePicker/4.8/WdatePicker.js?rev=@@hash"></script>
<!--表单验证-->
<script type="text/javascript" src="../../lib/jquery.validation/1.14.0/jquery.validate.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/jquery.validation/1.14.0/validate-methods.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/jquery.validation/1.14.0/messages_zh.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/datatables/1.10.0/jquery.dataTables.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/laypage/1.2/laypage.js?rev=@@hash"></script>
<script src="../../ht-js/public.js?rev=@@hash"></script>
<!--验证token-->
<script src="../../ht-js/verifyToken.js?rev=@@hash"></script>
<script src="../../ht-js/Project.js?rev=@@hash"></script>
<script src="../../ht-js/coupon/coupon-topic-detail.js?rev=@@hash"></script>
<!--<script>
    $('#reset').click(function(){
        $('input').val('');
    })

    jQuery.Huitab = function (tabBar, tabCon, class_name, tabEvent, i) {
        var $tab_menu = $(tabBar);
        // 初始化操作
        $tab_menu.removeClass(class_name);
        $(tabBar).eq(i).addClass(class_name);
        $(tabCon).hide();
        $(tabCon).eq(i).show();
        $tab_menu.bind(tabEvent, function () {
            $tab_menu.removeClass(class_name);
            $(this).addClass(class_name);
            var index = $tab_menu.index(this);
            $(tabCon).hide();
            $(tabCon).eq(index).show();
        });
    }

    $(function () {
        $.Huitab("#tab_goods .tabBar span", "#tab_goods .tabCon", "current", "click", "0")
    });
    // #tab_demo 父级id
    // #tab_demo .tabBar span 控制条
    // #tab_demo .tabCon 内容区
    // click 事件 点击切换，可以换成mousemove 移动鼠标切换
    // 1	默认第2个tab为当前状态（从0开始）

    $(function () {
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        })
    });

    var id = getQueryString('topicId');

    $.ajax({
        url: root.couponInter.coupon_getCouponTopicById,
        cache: false,  //禁用缓存
        type: "POST",
        dataType:'json',
        // contentType: "application/json",
        data: {
            "topicId":id
        },
        success: function (data) {
            console.log(data);
           //状态
           if(data.couponTopic.topicStatus==10){
               $('#topicStatus').html('已生效')
           }else if(data.couponTopic.topicStatus==30){
               $('#topicStatus').html('已失效')
           }else if(data.couponTopic.topicStatus==40){
               $('#topicStatus').html('强制失效')
           }
           //描述
            $('#description').html(data.couponTopic.description);
            $('#topicCode').html(data.couponTopic.topicCode);
            $('#topicName').html(data.couponTopic.topicName);
            $('#amount').html(data.couponTopic.amount);
            $('#totalCount').html(data.couponTopic.totalCount);
            $('#createUsername').html(data.couponTopic.createUsername);
            $('#createDept').html(data.couponTopic.createDept);
            $('#reason').html(data.couponTopic.reason);
            $('#introduction').html(data.couponTopic.introduction);
            $('#countPrice').html(data.couponTopic.totalAmount);
           //使用门槛
           if(data.couponTopic.useCondition==0){
              $('#condition').html('不限订单金额');
           }
           else{
               $('#useCondition').html(data.couponTopic.useCondition);
           }
           // 类型
           if(data.couponTopic.topicType==10){
                $('#topicType').html('满减券')
            }else if(data.couponTopic.topicType==20){
                $('#topicType').html('现金券')
            }
           //有效时间
            if(data.couponTopic.dayNumber==0){
                if(data.couponTopic.useEndtime==null){
                    $('#useTime').html(data.couponTopic.useBegtime+" - 不限");
                }else{
                    $('#useTime').html(data.couponTopic.useBegtime+"到"+data.couponTopic.useEndtime+"之内有效");
                }
            }else{
                $('#dayNumber').html(data.couponTopic.dayNumber);
            }
           //端口
            if(data.couponTopic.applPort==0){
                $('#applPort').html('不限');
            }else{
                $('#applPort').html('电脑端');
            }
           //商品范围
            if(data.couponTopic.applRange==1){
                $('#applRange').html('指定品类');
            }else if(data.couponTopic.applRange==2){
                $('#applRange').html('指定场景');
            }
            else{
                $('#applRange').html('全场通用');
            }
            //商品范围
            if(data.couponTopic.applCate==1){
                $('#applCate').html('适用品类');
            }else{
                $('#applCate').html('排除品类');
            }
            var p = data.couponProducts[0].spuId.replace(/(^\s*)|(\s*$)/g, "").split(";").length;
            var k = data.couponProducts[0].skuId.replace(/(^\s*)|(\s*$)/g, "").split(";").length;
            var u = data.couponProducts[1].spuId.replace(/(^\s*)|(\s*$)/g, "").split(";").length;
            var o = data.couponProducts[1].skuId.replace(/(^\s*)|(\s*$)/g, "").split(";").length;

            $('#number').html(p+k+u+o-4);

            $('#spuText').html(data.couponProducts[0].spuId);
            $('#skuText').html(data.couponProducts[0].skuId);
            $('#spuText1').html(data.couponProducts[1].spuId);
            $('#skuText1').html(data.couponProducts[1].skuId);
        },
        error: function () {
            $.Huimodalalert('失败！');
        }
    });
    $('#putout').attr('href',root.couponInter.coupon_exportProductExcel+id);
</script>-->
</body>
</html>